﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsumoDeAPI.Model
{
    public class AirportService:ServiceModel
    {

        public event EventHandler<AirportResponseReadyEventArg> responseReady;

        public AirportService() { 
        
        }

        public  List<Airport> getAirportsByCountry(string pais){

            String strwsUri =
                 "http://www.webservicex.net/airport.asmx/GetAirportInformationByCountry?country="+ pais;

            System.Net.WebRequest req = System.Net.WebRequest.Create(strwsUri); 
            req.Method = "GET";
            req.ContentType = "application/x-www-form-urlencoded";


            System.IO.Stream streamResponse = req.GetResponse().GetResponseStream();
            System.IO.StreamReader streamRead = new System.IO.StreamReader(streamResponse);
            string responseString = streamRead.ReadToEnd();

            return new List<Airport>();
        
        }

    }
}
